package org.jeecg.modules.nurse_user.mapper;

import java.util.List;

import org.jeecg.modules.nurse_user.entity.NurseUserFamily;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @Description: 用户监护人
 * @Author: jeecg-boot
 * @Date: 2024-06-09
 * @Version: V1.0
 */
public interface NurseUserFamilyMapper extends BaseMapper<NurseUserFamily> {

    /**
     * 通过主表id删除子表数据
     *
     * @param mainId 主表id
     * @return boolean
     */
    public boolean deleteByMainId(@Param("mainId") String mainId);

    /**
     * 通过主表id查询子表数据
     *
     * @param mainId 主表id
     * @return List<NurseUserFamily>
     */
    public List<NurseUserFamily> selectByMainId(@Param("mainId") String mainId);
    
    /**
     * 根据id获取anfineid序列值
     * 
     * @param id 主键id
     * @return String anfineid序列值
     */
    @Select("SELECT seq_anfineid(#{id}) AS anfineid")
    public String selectAnfineidById(@Param("id") String id);

}